<?php
namespace frontend\models;

use yii\base\Model;
use common\models\User;
use yii\db\ActiveRecord;


/**
 * Signup form
 */
class Company extends ActiveRecord
{
    
    
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['cname', 'trim'],
            ['cname', 'required'],
            ['cname', 'unique', 'targetClass' => '\frontend\models\Company', 'message' => 'This username has already been taken.'],
            ['cname', 'string', 'min' => 2, 'max' => 255],

            ['cemail', 'trim'],
            ['cemail', 'required'],
            ['cemail', 'email'],
            ['cemail', 'string', 'max' => 255],
            ['cemail', 'unique', 'targetClass' => '\frontend\models\Company', 'message' => 'This email address has already been taken.'],
            
            ['cphone', 'required'],
            ['cphone',  'string', 'min' => 11, 'max' => 11],

           ];
    }

   
}
